package com.beeasy.hzbpm.bean;

import com.github.llyb120.nami.core.Async;

import static com.beeasy.hzbpm.service.WorkService.work;

public class Log {

    public static void log(Long uid, String msg, Object ...args){
        log(uid + "", msg, args);
    }

    public static void log(String uid, String msg, Object ...args){
        msg = String.format(msg, args);
        String finalMsg = msg;
        Async.execute(() -> {
            work.addLog(uid, finalMsg);
//            sqlManager.executeUpdate(new SQLReady("insert into T_SYSTEM_LOG(id,add_time,controller,method,user_id) values (?,?,?,?,?)", snowflake.nextId(), new Date(), "bpm",finalMsg, uid));
        });

    }
}
